package com.qfjy.homework.wangzhi;

/**
 * @author wz
 * @date 2022-03-21 05:41
 * @Description:
 */

public class DecoratorPatternDemo {
    public static void main(String[] args) {
        Vehicle car=new Car();
        VehicleDecorator speedCar = new SpeedVehicleDecorator(new Car());
        VehicleDecorator speedBicycle = new SpeedVehicleDecorator(new Bicycle());
        System.out.println("速度如何？");
        speedCar.type();
        speedBicycle.type();
    }
}
